package com.blog.personalblog.util;

public class StrUtil {
    public static boolean isEmpty(String s){
        if (s == null)return true;
        return false;
    }

    public static boolean isBlank(String s){
        if (s == "")return true;
        return false;
    }

    public static boolean isEmptyOrBlank(String s){
        if (s == null || s == "")return true;
        return false;
    }

    public static String defaultIfBlank(String message,String s){
        if (isEmptyOrBlank(message)){
            message = s;
        }
        return message;
    }
}
